/*=============================================================================

  IO CONFIGURATION DEFINITION

  FILE: HIO_CFG.cpp
  
  DESCRIPTION

    IO configuration
    
  EXTERNALIZED FUNCTIONS


   Copyright (c) DaeSung Engineering Inc. All rights reserved.

=============================================================================*/
/*=============================================================================

  EDIT HISTORY

  ---------  -------  -------------------------------------------------------
    when       who       what, where, why
  ---------  -------  -------------------------------------------------------
   07/15/04   nso4th    Initial version

=============================================================================*/

/*=============================================================================
  HEADER INCLUSION
=============================================================================*/
#include <Cust_Target.h>
#include "HIO_cfg.h"

/*=============================================================================
  CONSTATN DEFINITION
=============================================================================*/
#define HIO_DEV_NUM			(1)

/*-------------------------------------------------------------------
  IO DEVICE 0
-------------------------------------------------------------------*/
static iodev_setup_s gioDEV0 = {
#ifdef TG_HW_IODEV_SIMUL
	DIODEV_EMULATOR,
#else
	DIODEV_AXT_SIO, //dev_name
#endif
	"", //dev_str
	0, //subID
	32, //numIn
	32, //numOut
	{ \
		// INPUT		
		{"I00: Reserved"},
		{"I01: Reserved"},
		{"I02: Reserved"},
		{"I03: Reserved"},
			
		{"I04: Reserved"},
		{"I05: Reserved"},
		{"I06: Reserved"},
		{"I07: Reserved"},
			
		{"I08: Reserved"},
		{"I09: Reserved"},
		{"I10: Reserved"},
		{"I11: Reserved"},
			
		{"I12: Reserved"},
		{"I13: Reserved"},
		{"I14: Reserved"},
		{"I15: Reserved"},

		{"I16: Reserved"},
		{"I17: Reserved"},
		{"I18: Reserved"},
		{"I19: Reserved"},
			
		{"I20: Reserved"},
		{"I21: Reserved"},
		{"I22: Reserved"},
		{"I23: Reserved"},
			
		{"I24: Reserved"},
		{"I25: Reserved"},
		{"I26: Reserved"},
		{"I27: Reserved"},
			
		{"I28: Reserved"},
		{"I29: Reserved"},	
		{"I30: Reserved"},
		{"I31: Reserved"},

		// OUTPUT
		{"O00: Reserved"},
		{"O01: Reserved"},
		{"O02: Reserved"},
		{"O03: Reserved"},
			
		{"O04: Reserved"},
		{"O05: Reserved"},
		{"O06: Reserved"},
		{"O07: Reserved"},

		{"O08: Reserved"},
		{"O09: Reserved"},
		{"O10: Reserved"},
		{"O11: Reserved"},
			
		{"O12: Reserved"},
		{"O13: Reserved"},
		{"O14: Reserved"},
		{"O15: Reserved"},

		{"O16: Reserved"},
		{"O17: Reserved"},
		{"O18: Reserved"},
		{"O19: Reserved"},
			
		{"O20: Reserved"},
		{"O21: Reserved"},
		{"O22: Reserved"},
		{"O23: Reserved"},
			
		{"O24: Reserved"},
		{"O25: Reserved"},
		{"O26: Reserved"},
		{"O27: Reserved"},
			
		{"O28: Reserved"},
		{"O29: Reserved"},	
		{"O30: Reserved"},
		{"O31: Reserved"},
	} \
};

/*=============================================================================
  EXTERNALIZED FUNCION DEFINITION
=============================================================================*/

iodev_cfg_s *iodev_default_alloc(void)
{
	iodev_cfg_s		*cfg;

	cfg = (iodev_cfg_s*)memCalloc(sizeof(*cfg));

	cfg->dev_num = HIO_DEV_NUM;
	cfg->tbl = (iodev_setup_s*)memCalloc(sizeof(*(cfg->tbl))*(cfg->dev_num));

	memCopy((cfg->tbl+0), &gioDEV0, sizeof(iodev_setup_s));

	return	cfg;
}


void iodev_default_free(iodev_cfg_s *cfg)
{
	if(cfg == NULL)
		return;

	if(cfg->tbl)
	{
		memFree(cfg->tbl);
		cfg->tbl = NULL;
	}
	memFree(cfg);
}

/*--- END OF HIO_CFG.C ---*/
